package com.unipay.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.unipay.model.order.OrderInfo;
import com.unipay.model.order.PaymentInfo;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * @Author Chenmy
 * @Date 2023/7/18 22:07
 * @Desc TODO
 */
public interface PaymentService extends IService<PaymentInfo> {

    /**
     * 保存交易记录
     * @param order
     * @param paymentType 支付类型（1：微信 2：支付宝）
     */
    void savePaymentInfo(OrderInfo order, Integer paymentType);

    void paySuccess(String out_trade_no, Integer status, Map<String, String> resultMap);

    PaymentInfo getPaymentInfo(Long orderId, Integer paymentType);
}
